import App from './App'

// #ifndef VUE3
import Vue from 'vue'
/**
 * 引入
 * request 接口不同
 */
import request from "@/utils/request.js";
import formdata from "@/utils/form.js";
import store from './store';
import util from "@/utils/util.js";
import Cache from "@/utils/cache.js";

import uView from '@/uni_modules/uview-ui'
Vue.use(uView);

import lsSkeleton from '@/components/ls-skeleton/ls-skeleton.nvue';
Vue.component('ls-skeleton', lsSkeleton);

uni.$u.setConfig({
	// 修改$u.config对象的属性
	config: {
		// 修改默认单位为rpx，相当于执行 uni.$u.config.unit = 'rpx'
		unit: 'rpx'
	},
	// 修改$u.props对象的属性
	props: {
		// 修改radio组件的size参数的默认值，相当于执行 uni.$u.props.radio.size = 30
		radio: {
			size: 15
		}
		// 其他组件属性配置
		// ......
	}
});

Vue.prototype.$request = request;
Vue.prototype.$formdata = formdata;
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$store = store;

Vue.config.productionTip = false;

App.mpType = 'app'
const app = new Vue({
    ...App,
	store
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  const store = createStore();
  app.use(store);
  return {
    app,
	store
  }
}
// #endif